﻿package com.shuqi.activity.Fragments;

import com.shuqi.statistics.StatisticsUtils;

import android.support.v4.app.Fragment;
import android.view.KeyEvent;

public abstract class FragmentBase extends Fragment {
    protected Runnable r;
    protected Thread t;

    /**
     * UI初始化
     */
    public abstract void fragmentLogicForward();

    /**
     * 数据初始化
     */
    public abstract void fragmentInitData();

    public boolean onKeyDown(int keyCode, KeyEvent event) {
        return false;
    };

    // 当前view在viewpager中显示出来时调用
    public void onPageSelected() {

    }
    @Override
    public void onResume() {
        super.onResume();
        StatisticsUtils.onPageStart(this);
    }
    @Override
    public void onPause() {
        super.onPause();
        StatisticsUtils.onPageEnd(this);
    }
}
